package com.webapp.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webapp.dao.UserInfoDao;
import com.webapp.model.UserInfo;

@Service
public class UserInfoService {

	@Autowired
	private UserInfoDao userInfoDao;
	
	public UserInfo findByfindByOpenid(String openid, Integer type){
		return userInfoDao.findByOpenid(openid,type);
	}
	
	
	public UserInfo findBySAndOAndC(String openid,String cph,String streetNo,Integer type) {
		return userInfoDao.findBySAndOAndC(openid, cph, streetNo,type);
	}


	public void save(UserInfo user) {
		userInfoDao.save(user);
	}


	public void update(UserInfo user) {
		userInfoDao.update(user);
	}
	
	
}
